//
//  LolaTrackData+Utilities.h
//  LAMapBasicDemo
//
//  Created by 罗亮富 on 2018/1/10.
//  Copyright © 2018年 2Bulu. All rights reserved.
//


#import "LAGTrackPolyLineCreater.h"



//LolaTrackInfo、TrackSegment、LAGPointData、TrackPolyline、LAGAppMapView之间的关系描述
@class LAGAppMapView;




#pragma mark- TrackSegment -----------------------------------
@interface TrackSegment (Relationships)

//will first return cached polyline if exist, if create is set to YES, it will create new polyline object
-(nullable TrackPolyline *)polyLineWith2ndValueType:(TrackPolylinePointSecondValueType)valType
                       ofCoordinateSysytem:(LACoordinateSystem)mapType
                          createIfNotExist:(BOOL)create;

@property (nullable, readonly, weak) NSArray<TrackPolyline *> *allPolyLines;//所有创建了的polyLine


@end

#pragma mark- TrackPolyline -----------------------------------
@interface TrackPolyline (Relationships)

@property (nullable, readonly) TrackSegment *sourceTrackSegment;
@property (nullable, readonly, weak) NSArray<LAGAppMapView *> *addedToMaps;//被添加到的地图，一个overlay可以添加到多个地图上

-(void)removeFromMapView:(nullable LAGAppMapView *)mapView;
-(void)removeFromAllAddedMaps;

@end

#pragma mark- DEFINES -----------------------------------
#define kLineMapRenderedSources @"map-Sources"
